#include <iostream>
#include <string>
using namespace std;

class Student;

class Person{
//friend void Display(const Person& p, const Student& s);
protected:
  string _name;
  string _id;
  int _age;

public:
  Person(const char* name, const char* id, int age)
    :_name(name),
    _id(id),
    _age(age)
  {}
};

class Student : public Person{
friend void Display(const Person& p, const Student& s);
  string _stuid;
public:
  Student(const char* name, const char* id, int age, const char* stuid)
    :Person(name, id, age),
    _stuid(stuid)
  {}

  void Print(){
    cout << _name << " ";
    cout << _id << " ";
    cout << _age << " ";
    cout << _stuid << endl;
  }
};


void Display(const Person& p, const Student& s)
{
  //cout << "pname:" << p._name << endl;
  cout << "sname:" << s._name << endl;
  cout << "stuid:" << s._stuid << endl;
}

void Test6(){
  Person p("xiaoming", "123123", 18);
  Student s("LiHua", "4343", 20, "5678");
  Display(p, s);
}

int main(){
  Test6();
  return 0;
}
